package com.lzw.mapper.superAdmin;

import com.lzw.pojo.Returns;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface ReturnsManageMapper {
    List<Returns> list(@Param("medicine") String medicine, @Param("returnDate") LocalDate returnDate);

    void delete(@Param("ids") List<Integer> ids);

    @Insert("INSERT INTO pharmacymanagement.returns(medicine, quantity_returned, return_date, reason) VALUES (#{medicine}, #{quantityReturned}, #{returnDate}, #{reason})")
    void add(Returns returns);

    void update(Returns returns);
}
